home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / i_set.exe / README < prev   
Text File  |  1991-09-05  |  2KB  |  93 lines

  1. CHOOSE is a minimal utility based on I-SET.
  2. It was developed (and is now heavily used) by a crowded programming
  3. lab which has to deal with multiple environments.
  4. To cut off with all those terrible .BATs to change path, lib, tmp, help
  5. and so on in the environment we got CHOOSE running.
  6. CHOOSE reads as input a text file named CHOOSE.INI which is expected
  7. to be in the directory pointed by the INIT environment variable.
  8. Anyway the -f switch will direct CHOOSE to use any file.
  9.  
  10. The CHOOSE.INI file is a pure-ASCII file composed of "sections". Sections
  11. are identified by a beginning "tag", that is, a string enclosed in square
  12. brackets. A section ends with the beginning of the next or the end of
  13. the file.
  14. In a section there can be any number of CHOOSE commands. Commands are
  15. simple one-liners which deal with modifying the environment.
  16. Sections are executed if given on CHOOSE command-line. Sections named
  17. "choose" are alway executed. See the use() command to see how to exploit
  18. this behaviour. For example, 
  19.                 choose c
  20. will execute the section [C] in choose.ini.
  21.  
  22. The grammar is easily retrieved by typing "choose -h".
  23.  
  24. This is an actual CHOOSE.INI file. Obviously directories will be different
  25. everywhere else!
  26.  
  27. [CHOOSE]
  28. init="d:\init"
  29.  
  30. [shari]
  31. ; user SHARI
  32. use("C")
  33. use("log")
  34.  
  35.  
  36. [PUS]
  37. ; user PUS
  38. if ("D:\C\BIN" in PATH)
  39.     use("~C")
  40. end
  41. use ("log")
  42.  
  43. [LOG]
  44. dos("c:\lanman.dos\netprog\net logon /Y")
  45. ; change path to network utlities
  46. PATH-="C:\BIN"
  47. PATH-="C:\USR\BIN"
  48. PATH-="C:\USR\LBIN"
  49. PATH+="W:\BIN"
  50. PATH+="W:\USR\BIN"
  51. PATH+="W:\USR\LBIN"
  52.  
  53. [LOGOFF]
  54. dos("c:\lanman.dos\netprog\net logoff /Y")
  55. PATH-="W:\BIN"
  56. PATH-="W:\USR\BIN"
  57. PATH-="W:\USR\LBIN"
  58. PATH+="C:\BIN"
  59. PATH+="C:\USR\BIN"
  60. PATH+="C:\USR\LBIN"
  61.  
  62. [C]
  63. PATH^="D:\C\BIN"
  64. PATH+="D:\C\BINB"
  65. LIB+="D:\C\LIB"
  66. INCLUDE^="D:\C\INCLUDE"
  67. HELPFILES+="D:\C\HELP"
  68.  
  69. [~C]
  70. PATH-="D:\C\BIN"
  71. PATH-="D:\C\BINB"
  72. LIB-="D:\C\LIB"
  73. INCLUDE-="D:\C\INCLUDE"
  74. HELPFILES-="D:\C\HELP"
  75.  
  76. [SIMHLAPI]
  77. SIMFILES="E:\SIMPC\SIMHLAPI"
  78. PATH+=SIMFILES
  79.  
  80. [xSIMHLAPI]
  81. if (isset("SIMFILES"))
  82.     PATH-=SIMFILES
  83.     -SIMFILES
  84. end
  85.  
  86. [RESET]
  87. -LIB
  88. -INCLUDE
  89. -HELPFILES
  90. PATH="C:\DOS;E:\WIN3"
  91.  
  92.  
  93.